package test.java;

import main.java.BLT.Especial;

import org.junit.Before;
import org.junit.Test;


public class testEspecial {
	
	private Especial e;

	@Before
	public void Especial(){
	e = new Especial("War Elephants",4,"Cavalry");
	}
	
	@Test(expected=java.lang.IllegalArgumentException.class)
	public void TestConstructor1(){
		e= new Especial("War Elephants",-1,"Cavalry");
	}
	
	@Test(expected=java.lang.IllegalArgumentException.class)
	public void TestConstructor2(){
		e= new Especial("War Elephants",4,"Caballeria");
	}
	
	@Test
	public void TestConstructor3(){
		e= new Especial("War Elephants",4,"");
		assert e.getNombre().equals("War Elephants");
		assert e.getValor().equals(4);
		assert e.getRequiere().equals("");
	}
	
	@Test(expected=java.lang.IllegalArgumentException.class)
	public void TestConstructor4(){
		e= new Especial("",4,"");
	}
	
	
	@Test(expected=java.lang.IllegalArgumentException.class)
	public void TestSetRequiere(){
		e.setRequiere("Infantry");
	}
	
	@Test(expected=java.lang.IllegalArgumentException.class)
	public void TestSetRequiere1(){
		e.setRequiere("Infanteria");
	}
	
	@Test
	public void TestSetRequiere2(){
		e.setRequiere("Artillery");
		assert e.getRequiere().equals("Artillery");
	}
}
